Add compatibility for BASH < 4