checkGD

Sets a global $gd2 variable needed by some functions to determine whether the GD2 library is present.