It seems that pkg-config sometimes spits out a bunch of trailing
whitespace. This gets into the substituted variables and makes
them a bit annoying to work with. Add a step to the library helper
which normalizes the spaces: in addition to removing leading and
trailing spaces this will also remove internal spaces, which I
think should be harmless as there does not appear to be any way
for the user to usefully get quoted spaces into these variables.