Build system improvements

Mainly the same as https://github.com/alainfrisch/ppx_tools/pull/1