Improved linking to fix GCC linux argument order issues