Add paths to jpeg/gif dependencies for ubuntu 12.04. /me crosses fingers.