Merge pull request #240 from Alexpux/develop

Optimize build script