Fix framebuffer.cpp compiling errors by using the legacy one