I don't have an alternative suggestion at the moment, my post was merely a hint to make you aware of the downsides of it. I am not sure if any substantial amount of efforts were put in lately to make the discussed API more reliable. I'm glad it worked fine for you.
Nobody can give you wiser advice than yourself. - Cicero