Casting node callback functions rather than changing the sigs

This means it works with 0.10 and 0.11