Fix travis build

Use $CC env variable provided by travis.
Place libraries in the right order.