Add support for automake builds