Added getopt:to_record/3,4 functions