BGQ - Changed order of library inclusions and fixed incorrect declaration
to compile correctly on newer compilers

Signed-off-by: Danny Auble <da@schedmd.com>
Fix for not building sview if glib exists on a system but not the gtk libs.