Fixes library order for GCC builds