fix build failures on platforms that use -Wunused-private-variable for builds