Jarkko's recent addition of BSD O_* constants conflict with the original patch. Here's a rebased one, with the Makefile.PL additions formatted less intrusively.