guard against in-source builds and bad build-type strings