Replace minor() by semiminor() and major() by semimajor().

The minor() and major() methods produced problems on FreeBSD where both functions are predefined macros.