fix shader-bundle-tool length computation
build fixes

* link with -lX11 and -lpthread to fix dpkg-shlibdeps warnings;
* don't link with -lvdpau, since don't have to;
* build both shared and static versions (requires cmake 2.8.8 to avoid
  compiling same sources twice)