libffi: split build and source directory to work around some makefile bugs