fixes in build system for ST2/3