Make autogen work in non-srcdir builds