Fix compilation when configured with -no-widgets