Fix #359: Incorrect build due to false negative configure checks