Fix for Issue #510 : Moved linker flags to the end of cmd line in build.sh and bat templates

Fix for Issue #510. Changed places for linker flags in build scripts templates.
You need to regenerate csources, i have compiler/mapping.txt and build/nimbase.h changed, not sure if they are correct, so i push only what i have changed by hands. I've tried to bootstrap and now the compiler builds successfully.