Fix MessageReader and MessageWriter to compile with latest mono release