Allow version with suffix in build scripts

I think it is useful to allow setting a version suffix like 2.1.3-testing to the build scripts.
This change was tested with:
* Windows MinGW 4.4.0 and QT 4.8
* Ubuntu 12.04 i386 and amd64
* Mac OS with latest xcode under 10.8 and 10.9