Added MessageBlock serialize method.