Use backwards-compatible attempt to write SharedPreferences in an asynchronous way