Replace the 'new IntPtr(ptr.ToInt64() + x)' pattern with 'ptr + x' since that's valid in .NET 4 and easier to translate in JSIL
Update samples
Don't sleep in the main loop in JSIL builds