wayland: Fix cast warning

It's sometimes hard to see around all the deprecation warnings. Sorry
about that...