Added gomp to the module linking flags.

Re #9328. It appears that make appends the compile flags when
calling the linker and ninja does not.
Merge remote-tracking branch 'origin/feature/9328_ninja_gomp'