compatibility fix for older perls