Fix if syntax to work in sh (instead of bash)