With the greatest of respect I don't understand why you are reluctant to get married when it offers your girlfriend and child the greatest security of you all being able to be together.
While you say you would rather get married when you want to rather then when you have to, the situation has changed somewhat due to the pregnancy.
If you were thinking of getting married at some stage, your prospective child is just bringing this date forward.
I think its rather sad that you are thinking in these terms "have to get married" - if I was your girlfriend I would be very disappointed that you felt like this.