Fix build with older gccs by detecting flags
Merge pull request #65 from avsm/gcc48-fix

Fix build with older gccs by detecting flags