Yes, you need to become her legal guardian. A letter from her parents appointing you as such should be sufficient for you to go to court to make it legal.