fix linking under Ubuntu 12