Fix link errors

This fixes link errors on Ubuntu 13.04 with libm and libGL