Checks if context obj is NULL before calling clReleaseContext() in GoclContext
[example] Resets error to NULL if GPU context creating fails
Explicitly link libm

This is necessary on distributions without DSO, e.g. Fedora.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>