Fix configure on BSD