System.Attribute errors when compiling for Windows Store / Phone 8.1

I use a Singleton that will load a Prefab (from Resources) if the singleton instance isn’t found. Its a modified version of what can be found here:
http://kleber-swf.com/singleton-monobehaviour-unity-projects/

This seems to work fine for most builds (tested on iOS and Standalone Windows builds)

However, when trying to create a Windows Phone 8.1 Visual Studio Project (or Windows Universal 8.1), Unity reports the following errors that keep it from building the project (the code that generates the error is listed above)

if (System.Attribute.IsDefined (myType, typeof(SingletonPrefabAttribute)))
{
...
}

error CS0117: ‘System.Attribute’ does not contain a definition for ‘IsDefined’

SingletonPrefabAttribute attr = (SingletonPrefabAttribute) System.Attribute.GetCustomAttribute (myType, typeof(SingletonPrefabAttribute));

error CS0117: ‘System.Attribute’ does not contain a definition for ‘GetCustomAttribute’

Any ideas as to what could be causing this?

I got around this by surrounding the code with

#if UNIYT_EDITOR
… Attribute.notgonnawork
#endif