compatibility fix for other shells than bash >= 3.1