create callback differently on julia v0.2 fixes #45

between 0.2 and 0.3 the way callbacks are handled have changed. This creates a function conditional
on the julia Version we are using.