Wrapped SAPI dependencies with preprocessor condition to remove ATL dependency.