buildlib.sh: fixed standard type

GCC does not have a c++11 value for the standard, instead it should be c++0x.
Also added the rm flag -f to ensure that rm does not fail when any of the
globbed files are absent.
Added support for different GCC versions.

The issues here is that the flag used to specify the use of the 2011 standard
change from version 4.6 (c++0x) to 4.7 (c++11). This change introduces a query
to determine which version of the compiler is being used and sets the flag
accordingly.
Merge pull request #1 from jdowner/linux-bugfix

Support for multiple GCC versions