If you can iterate the rings and holes you can do this yourself. Format is pretty simple. Pseudocode:

emit 'MULTIPOLYGON('
for each ring
if it's not the first ring emit ','
emit '('
emit '('
for each point in ring
if it's not the first point emit ','
emit X
emit ' '
emit Y
end point loop
emit ')'
for each hole in ring
emit ',('
for each point in hole
if it's not the first point emit ','
emit X
emit ' '
emit Y
end point loop
emit ')'
end hole loop
emit ')'
end ring loop
emit ')'