onCompile now compatbile with Nette\Object

Respects [Nette\Object's behaviour](https://github.com/nette/utils/blob/c6759cd5e485d9ba6bbabe7eca5b823e9aa6f819/src/Utils/ObjectMixin.php#L61-L62
) 
For more info see discussion here: https://github.com/Kdyby/Events/issues/41