Call xmlNodeGetSpacePreserve with element node

Since libxml2 version 2.9.0, xmlNodeGetSpacePreserve checks that the
argument is an element node:

https://git.gnome.org/browse/libxml2/commit/?id=3e62adbe39f2083c9c2cd3330c320227818fd361
Add math library to executable link flags

Should fix bug #706882:

https://bugzilla.gnome.org/show_bug.cgi?id=706882
Fix return value of xsltRegisterExtModuleElement

xsltRegisterExtModuleElement returned success if xsltNewExtElement
failed. Detected by -Wunused-but-set-variable.
Remove unused variable in xsltGenerateIdFunction

doc isn't used as of commit "Fix generate-id() to avoid generating the
same ID".
Suppress unused variable warning.
Remove unused parameters
Fix time type in xsltSaveProfiling