Fix Travis CI tests for PHP 5.2

PHP 5.2 tests have been broken on Travis CI since r8017, the switch to using
WP's "develop" suite instead of the old wp-tests repo. This changeset fixes
these builds by making the following changes:

- Better consistency with the use of environment variables (swap out the old
  WP_CORE_DIR for WP_DEVELOP_DIR, which is what BP itself expects when setting
  up PHPUnit)
- Use of `export` when creating the environment variable, to ensure that PHP
  has access to it across shell sessions

Hat tip to netweb for an initial patch addressing this issue

See #5708

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8512 cdf35c40-ae34-48e0-9cc9-0c9da1808c22