configure: Use m4 defines for minimum library versions rather than shell