Fix building with Vala 0.20

Vala 0.20 has major()/minor() in Posix already, so conditionalize our
definitions.