8151841: Build needs additional flags to compile with GCC 6

C++ standard needs to be explicitly set and some optimisations turned off to build on GCC 6

Reviewed-by: erikj, dholmes, kbarrett
5 files changed