Script fixes and 64bit patch from Jim Dovey

Hi, sorry it took me a while, I was waiting to add the patch to fix the linking errors when using Boost.Filesystem from boost 1.53 (I only added it to 1.49). I'm kind of busy so I'll add it some other time.

Apart from the above fix, this pull request contains a patch to support 64bit platforms from Jim Dovey and some small fixes to the script.