Use the protocol version from the handshake

I unnoticeably used the protocol version from the record layer thinking
I was using the protocol version from the handshake. This commit fix
this and uses the protocol version from the handshake instead of from
the record layer as in https://gist.github.com/rcvalle/10335282 which is
how it should have been initially.

Thanks to @wvu-r7 for finding this out!