Make sure -fPIE is added to the compile flags.