Add a linker flag to fix build on Ubuntu

This PR fixes the build on Ubuntu 12.04.