Fix build by modifying link orders