Compatibility changes for Nette 2.2

Fixing depracated issues in Nette 2.2