Ubuntu support

Added Ubuntu support (tested for Ubuntu 10.04 LTS and 12.04 LTS).