Nighly build from 2017-06-15 crashes (https://bitcoin.jonasschnelli.ch/build/176)
Nighy build from 2017-06-14 works fine (https://bitcoin.jonasschnelli.ch/build/175)

Relevant commit must be between 228c319a and fbf5d3ba.

```shell
jonasschnelli@Jonass-MBP:~/Documents/bitcoin/bitcoin$ ~/Downloads/bitcoin-0.14.n/bin/bitcoind --regtest
Abort trap: 6
jonasschnelli@Jonass-MBP:~/Documents/bitcoin/bitcoin$ lldb ~/Downloads/bitcoin-0.14.n/bin/bitcoind
(lldb) target create "/Users/jonasschnelli/Downloads/bitcoin-0.14.n/bin/bitcoind"
Current executable set to '/Users/jonasschnelli/Downloads/bitcoin-0.14.n/bin/bitcoind' (x86_64).
(lldb) run --regtest
Process 29763 launched: '/Users/jonasschnelli/Downloads/bitcoin-0.14.n/bin/bitcoind' (x86_64)
Process 29763 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff94f74d42 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff94f74d42 <+10>: jae    0x7fff94f74d4c            ; <+20>
    0x7fff94f74d44 <+12>: movq   %rax, %rdi
    0x7fff94f74d47 <+15>: jmp    0x7fff94f6dcaf            ; cerror_nocancel
    0x7fff94f74d4c <+20>: retq   
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff94f74d42 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff950625bf libsystem_pthread.dylib`pthread_kill + 90
    frame #2: 0x00007fff94eda4bb libsystem_c.dylib`__abort + 140
    frame #3: 0x00007fff94edad7e libsystem_c.dylib`__stack_chk_fail + 205
    frame #4: 0x0000000100270364 bitcoind`___lldb_unnamed_symbol4989$$bitcoind + 228
    frame #5: 0x0000000100046660 bitcoind`___lldb_unnamed_symbol475$$bitcoind + 32
    frame #6: 0x0000000100003be9 bitcoind`___lldb_unnamed_symbol1$$bitcoind + 2665
    frame #7: 0x00000001000042a1 bitcoind`___lldb_unnamed_symbol2$$bitcoind + 49
    frame #8: 0x00007fff94e46235 libdyld.dylib`start + 1
(lldb) 
```
}
#elif defined(HAVE_GETENTROPY)
    /* On OpenBSD this can return up to 256 bytes of entropy, will return an
     * error if more are requested.
     * The call cannot return less than the requested number of bytes.
     */
    if (getentropy(ent32, NUM_OS_RANDOM_BYTES) != 0) {
        RandFailure();
    }
#elif defined(HAVE_SYSCTL_ARND)
    /* FreeBSD and similar. It is possible for the call to return less
     * bytes than requested, so need to read in a loop.
     */
    static const int name[2] = {CTL_KERN, KERN_ARND};
    int have = 0;
    do {
        size_t len = NUM_OS_RANDOM_BYTES - have;
        if (sysctl(name, ARRAYLEN(name), ent32 + have, &len, NULL, 0) != 0) {
            RandFailure();
        }
        have += len;
    } while (have < NUM_OS_RANDOM_BYTES);
#else
    /* Fall back to /dev/urandom if there is no specific method implemented to
     * get system entropy for this OS.
     */
    GetDevURandom(ent32);
#endif
}
void GetRandBytes(unsigned char* buf, int num)