How to call WinAPI in 64 bit libreoffice

I need to call a WinAPI function in my macro.
I used to do it like this

' Declaration
Private Declare Function GetTickCount Lib "kernel32" () as Long

' somewhere in a sub
Dim time as Long
time = GetTickCount()

But since I updated my LibreOffice to version 6 x86_64 (later was version 5 x68) this code just crashes.
How can I fix this to make it work in 64bit version?

This is tdf#120706, and it will be fixed shortly. For now, functions with empty argument lists fail.