Compatibility with Nette 2.2

Fixing depracated issues in Nette 2.2