If global CFLAGS not set use -O2 as a default for submodules

Issue #168
Merge pull request #388 from Douglasj/issue168

If global CFLAGS not set use -O2 as a default for submodules