Link command order for gcc compatibility

Linker arguments must go at the end of the link command or gcc
will fail.