Buildsys improvements

Fixes #76.