tweaked compilation flags for Linux and OS X platforms.