buildsys.mk.in: merge in changes from upstream https://github.com/Midar/buildsys.