improve compatibility if sudo is not available

#29