Buildsys improvments

Fixes #76.