Allow reusing temporary object files generated by GHCi by writing to -odir in case -fwrite-interface was specified (#16670)