[Lidgren network] Method not found compiler error

I am trying to create my client with the imported lidgren network. When i just try to do a simple connect to the server i will get a compiler error telling me that there is a method missing. I dont know how to go forward from this. Do you guys know what the problem is and how i could fix this.

My Code:
using UnityEngine;
using System.Collections;
using System.Net;
using System.Threading;
using System.IO;
using Lidgren.Network;

public class NetworkHandler : MonoBehaviour 
{
	NetPeerConfiguration config;
	NetClient client;

	void Start () 
	{
		config = new NetPeerConfiguration("castaways");
		config.Port = 6112;
		config.EnableMessageType(NetIncomingMessageType.DiscoveryRequest);
		client = new NetClient(config);

		StartClient();
		Connect("localhost",6112);

	}


	public void Connect(string host, int port)
	{
		client.Connect(host,port);
	}

	public void StartClient()
	{
		Debug.Log("Starting Client");
		client.Start();
	}

	public void ShutDownClient()
	{
		Debug.Log("Client shutdown");
		client.Shutdown("Goodbye");
	}


	void Update () 
	{
	
	}
}

I attached this script to a empty gameObject and i got the following error from it

MissingMethodException: Method not found: ‘System.Threading.Monitor.Enter’.
Lidgren.Network.NetPeer.Start ()
NetworkHandler.StartClient () (at Assets/Scripts/NetworkHandler.cs:34)
NetworkHandler.Start () (at Assets/Scripts/NetworkHandler.cs:20)

Please help
//Cheers

I Found the solution for this problem if any future person gets it.

  1. set the library to build x86 (on 64 bit machines)
  2. set the NET framwork to 3.5
  3. in Unity, Edit->Project Settings->Player and under More, Per-
    Platform Settings change Optimization to .NET 2.0 (instead of the
    default Net2.0 subset).

Read about this solution on another site. But i only needed to change the Net framework to 3.5 before i compiled the Lidgren library.

Cheers everyone