Changes to meet new API requirements for libev 4.11. Also compile errors on 3.7.2-204.fc18.x86_64