Add conditional compiler directives for CF

Compact Framework doesn't support TraceEventType so we have to add a
conditional compiler directive.
Use TraceEventType correctly

Write and WriteLine must have TraceEventType.Resume, Fail should use
TraceEventType.Error, and TraceTransfer should use
TraceEventType.Transfer. Also the necessary conditional compiler
directives has to be added. fixes #166