Fix compiled GRFViewer bug using the API