Fix enabling gif/jpeg options on Ubuntu 13.04

It seems the regular expression used in has_lib.sh is a little too restrictive so does not match neither libgif.so.4 nor libjpeg.so.8 on my Ubuntu 13.04.

The effect is that node-canvas built but is silently missing the support for at least for these formats - calling code then passes in GIF images but an exception is thrown with a file could be be read error but no indication this is because of a build time configuration issue.