Improved all the build scripts. Fixed bug where 'release' builds weren't including STATICLIBS.