I don't see any moral problem with this, it simply increases interoperability. There are many open source projects that do similar things (For example: WINE, Samba). Having non-proprietary choices is good, and exposing the same APIs makes it easy to use your software as a drop-in replacement.
As to the legal aspect, that depends on where you live and IANAL.
As to the legal aspect, that depends on where you live and IANAL.