First of all: awk comes in several versions. The sub and gsub functions tipically belong to the enhanced '85 version. Previously I worked on an old Solaris 2.5 OS where awk invoked the original '77 version. If I had to use extended functionality I had to use nawk instead. There are more systems like that and you should check this out because your sub fubction seems perfectly right to me.
Second: To my knowledge the sub and gsub functions only operate with literal regexp's, not with parameterized ones. My way of working around this would be creating a shellscript that first writes an awk commandfile to disk (with the rexexp dynamically substituted from a variable) and then executes this file.
Third: If it's your objective here to change the fieldseparator which is performed on $0 you should do it like 'OFS = fieldseparator'. I believe your gsub tries to substitute every occurance of FS or backslash in $0 with the OFS but (g)sub only operates on strings and fieldseparators are not part of that.