fltk build fix

Fixes #29988 and #33093

Tested with tiger-vnc which is uses fltk