fixes #26 Replaced System.Array functions for compatibility with WP8.