Moved some build scripts around to use autotools