Fix compatibility with nette

See https://github.com/nette/nette/commit/f2d7d8db8ae1fc5c94f2ebc184b0d26e0c532029