Fix script to work under Ubuntu 14.04